<?php
/**
 * Класс Controller_News отвечает за обработку новостей
 * @author Sayp
 */
class Controller_News extends Controller_Base {
	
	public function action() {
		$url = Service_Escape::absolutelyEscapeString($this->arrRequest[1]);
  	  	// Ищем статью с таким URL
    	$objArticle = new Article();
      	$objArticle->find('first', array('conditions' => "`article`.`url` = '" . $url . "' AND `article`.`essence_type` = 3"));
		if (!$objArticle->id) throw new Exception('', 404);	  
		$objControllerDefault = new Controller_Default($this->arrRequest);
	 	$objControllerDefault->actionArticle($objArticle);
	}
}